Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: create a new workflow for getting charm paths and building them with cache #88

Merged
merged 2 commits into from
Dec 19, 2024

Conversation

DnPlas
Copy link
Contributor

@DnPlas DnPlas commented Dec 17, 2024

This new workflow uses the canonical/data-platform-workflows/.github/workflows/build_charm.yaml as the central piece for building charms in dedicated machines and uploading them as artefacts. This is beneficial because it will allow the CI of pull requests to use charm artefacts in different operations, such as testing and publishing, this change also helps reducing the build time as the build_charm.yaml workflow is set to use charmcarft cache.

Fixes #87

Dear reviewer: please refer to canonical/kfp-operators#634 for an example of this reusable workflow. The way to use it is by:

name: On Pull Request

# On pull_request, we:
# * always publish to charmhub at latest/edge/branchname
# * always run tests
# * always run builds with cache
on:
  pull_request:

jobs:
  get-paths-and-build:
    name: Get charm paths and build with cache
    uses: canonical/charmed-kubeflow-workflows/.github/workflows/get_charms_build_with_cache.yaml@KF-6690-build-with-cache

  tests:
    name: Run Tests
    needs: [get-paths-and-build]
    uses: ./.github/workflows/integrate.yaml
    secrets: inherit

  # publish runs in parallel with tests, as we always publish in this situation
  publish-charm:
    name: Publish Charm
    needs: [get-paths-and-build]
    uses: ./.github/workflows/publish.yaml
    secrets: inherit

@DnPlas DnPlas force-pushed the KF-6690-build-with-cache branch from 8127702 to 382b61e Compare December 17, 2024 13:17
@DnPlas DnPlas changed the title ci: create a new workflow for getting charm paths and building them w… ci: create a new workflow for getting charm paths and building them with cache Dec 17, 2024
…ith cache

This new workflow uses the  as
the central piece for building charms in dedicated machines and uploading them as artefacts. This is
beneficial because it will allow the CI of pull requests to use charm artefacts in different operations,
such as testing and publishing, this change also helps reducing the build time as the
workflow is set to use charmcarft cache.

Fixes #87
Copy link
Contributor

@NohaIhab NohaIhab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @DnPlas!

@DnPlas DnPlas merged commit 7970ad8 into main Dec 19, 2024
@DnPlas DnPlas deleted the KF-6690-build-with-cache branch December 19, 2024 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create workflow that has build with cache job
2 participants